home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / sndhrdw / atarijsa.h < prev    next >
C/C++ Source or Header  |  2000-03-12  |  7KB  |  219 lines

  1. /***************************************************************************
  2.  
  3.     Atari Audio Board II Interface
  4.  
  5. ****************************************************************************/
  6.  
  7. #include "driver.h"
  8. #include "machine/atarigen.h"
  9.  
  10.  
  11. void atarijsa_init(int cpunum, int inputport, int testport, int testmask);
  12. void atarijsa_reset(void);
  13.  
  14.  
  15. extern struct MemoryReadAddress atarijsa1_readmem[];
  16. extern struct MemoryWriteAddress atarijsa1_writemem[];
  17. extern struct MemoryReadAddress atarijsa2_readmem[];
  18. extern struct MemoryWriteAddress atarijsa2_writemem[];
  19. extern struct MemoryReadAddress atarijsa3_readmem[];
  20. extern struct MemoryWriteAddress atarijsa3_writemem[];
  21. extern struct MemoryReadAddress atarijsa3s_readmem[];
  22. extern struct MemoryWriteAddress atarijsa3s_writemem[];
  23.  
  24. extern struct TMS5220interface atarijsa_tms5220_interface;
  25. extern struct YM2151interface atarijsa_ym2151_interface_mono;
  26. extern struct YM2151interface atarijsa_ym2151_interface_stereo;
  27. extern struct YM2151interface atarijsa_ym2151_interface_stereo_swapped;
  28. extern struct POKEYinterface atarijsa_pokey_interface;
  29. extern struct OKIM6295interface atarijsa_okim6295_interface_REGION_SOUND1;
  30. extern struct OKIM6295interface atarijsa_okim6295s_interface_REGION_SOUND1;
  31.  
  32.  
  33. /* Used by Blasteroids */
  34. #define JSA_I_STEREO                                        \
  35.     SOUND_SUPPORTS_STEREO,0,0,0,                            \
  36.     {                                                        \
  37.         {                                                    \
  38.             SOUND_YM2151,                                     \
  39.             &atarijsa_ym2151_interface_stereo                \
  40.         }                                                    \
  41.     }
  42.  
  43. /* Used by Xybots */
  44. #define JSA_I_STEREO_SWAPPED                                \
  45.     SOUND_SUPPORTS_STEREO,0,0,0,                            \
  46.     {                                                        \
  47.         {                                                    \
  48.             SOUND_YM2151,                                     \
  49.             &atarijsa_ym2151_interface_stereo_swapped        \
  50.         }                                                    \
  51.     }
  52.  
  53. /* Used by Toobin', Vindicators */
  54. #define JSA_I_STEREO_WITH_POKEY                                \
  55.     SOUND_SUPPORTS_STEREO,0,0,0,                            \
  56.     {                                                        \
  57.         {                                                    \
  58.             SOUND_YM2151,                                     \
  59.             &atarijsa_ym2151_interface_stereo                \
  60.         },                                                    \
  61.         {                                                    \
  62.             SOUND_POKEY,                                     \
  63.             &atarijsa_pokey_interface                         \
  64.         }                                                    \
  65.     }
  66.  
  67. /* Used by Escape from the Planet of the Robot Monsters */
  68. #define JSA_I_MONO_WITH_SPEECH                                \
  69.     0,0,0,0,                                                \
  70.     {                                                        \
  71.         {                                                    \
  72.             SOUND_YM2151,                                     \
  73.             &atarijsa_ym2151_interface_mono                    \
  74.         },                                                    \
  75.         {                                                    \
  76.             SOUND_TMS5220,                                     \
  77.             &atarijsa_tms5220_interface                     \
  78.         }                                                    \
  79.     }
  80.  
  81. /* Used by Cyberball 2072, STUN Runner, Skull & Crossbones, ThunderJaws, Hydra, Pit Fighter */
  82. #define JSA_II_MONO(x)                                        \
  83.     0,0,0,0,                                                \
  84.     {                                                        \
  85.         {                                                    \
  86.             SOUND_YM2151,                                     \
  87.             &atarijsa_ym2151_interface_mono                    \
  88.         },                                                    \
  89.         {                                                    \
  90.             SOUND_OKIM6295,                                    \
  91.             &atarijsa_okim6295_interface_##x                \
  92.         }                                                    \
  93.     }
  94.  
  95. /* Used by Batman, Guardians of the 'Hood, Road Riot 4WD */
  96. #define JSA_III_MONO(x)                                        \
  97.     0,0,0,0,                                                \
  98.     {                                                        \
  99.         {                                                    \
  100.             SOUND_YM2151,                                     \
  101.             &atarijsa_ym2151_interface_mono                    \
  102.         },                                                    \
  103.         {                                                    \
  104.             SOUND_OKIM6295,                                    \
  105.             &atarijsa_okim6295_interface_##x                \
  106.         }                                                    \
  107.     }
  108.  
  109. /* Used by Off the Wall */
  110. #define JSA_III_MONO_NO_SPEECH                                \
  111.     0,0,0,0,                                                \
  112.     {                                                        \
  113.         {                                                    \
  114.             SOUND_YM2151,                                     \
  115.             &atarijsa_ym2151_interface_mono                    \
  116.         }                                                    \
  117.     }
  118.  
  119. /* Used by Space Lords, Moto Frenzy, Steel Talons, Road Riot's Revenge Rally */
  120. #define JSA_IIIS_STEREO(x)                                    \
  121.     SOUND_SUPPORTS_STEREO,0,0,0,                            \
  122.     {                                                        \
  123.         {                                                    \
  124.             SOUND_YM2151,                                     \
  125.             &atarijsa_ym2151_interface_stereo                \
  126.         },                                                    \
  127.         {                                                    \
  128.             SOUND_OKIM6295,                                    \
  129.             &atarijsa_okim6295s_interface_##x                \
  130.         }                                                    \
  131.     }
  132.  
  133.  
  134. /* Common CPU definitions */
  135. #define JSA_I_CPU                                            \
  136.     {                                                        \
  137.         CPU_M6502,                                            \
  138.         ATARI_CLOCK_14MHz/8,                                \
  139.         atarijsa1_readmem,atarijsa1_writemem,0,0,            \
  140.         0,0,                                                \
  141.         atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_14MHz/4/4/16/16/14)) \
  142.     }
  143.  
  144. #define JSA_II_CPU                                            \
  145.     {                                                        \
  146.         CPU_M6502,                                            \
  147.         ATARI_CLOCK_14MHz/8,                                \
  148.         atarijsa2_readmem,atarijsa2_writemem,0,0,            \
  149.         0,0,                                                \
  150.         atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_14MHz/4/4/16/16/14)) \
  151.     }
  152.  
  153. #define JSA_III_CPU                                            \
  154.     {                                                        \
  155.         CPU_M6502,                                            \
  156.         ATARI_CLOCK_14MHz/8,                                \
  157.         atarijsa3_readmem,atarijsa3_writemem,0,0,            \
  158.         0,0,                                                \
  159.         atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_14MHz/4/4/16/16/14)) \
  160.     }
  161.  
  162. #define JSA_IIIS_CPU                                        \
  163.     {                                                        \
  164.         CPU_M6502,                                            \
  165.         ATARI_CLOCK_14MHz/8,                                \
  166.         atarijsa3s_readmem,atarijsa3s_writemem,0,0,            \
  167.         0,0,                                                \
  168.         atarigen_6502_irq_gen,(UINT32)(1000000000.0/((double)ATARI_CLOCK_14MHz/4/4/16/16/14)) \
  169.     }
  170.  
  171.  
  172.  
  173. /* Board-specific port definitions */
  174. #define JSA_I_PORT                                            \
  175.     PORT_START                                                \
  176.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )                \
  177.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )                \
  178.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )                \
  179.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )            \
  180.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )    /* speech chip ready */\
  181.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )    /* output buffer full */\
  182.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )        /* input buffer full */\
  183.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )    /* self test */
  184.  
  185. /* used by Xybots */
  186. #define JSA_I_PORT_SWAPPED                                    \
  187.     PORT_START                                                \
  188.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )                \
  189.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )                \
  190.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )                \
  191.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )            \
  192.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )    /* speech chip ready */\
  193.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )    /* output buffer full */\
  194.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )        /* input buffer full */\
  195.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )    /* self test */
  196.  
  197. #define JSA_II_PORT                                            \
  198.     PORT_START                                                \
  199.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )                \
  200.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )                \
  201.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN3 )                \
  202.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )            \
  203.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )            \
  204.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )    /* output buffer full */\
  205.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )        /* input buffer full */\
  206.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )    /* self test */
  207.  
  208. #define JSA_III_PORT                                        \
  209.     PORT_START                                                \
  210.     PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )                \
  211.     PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )                \
  212.     PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )                \
  213.     PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE )            \
  214.     PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )    /* self test */\
  215.     PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )    /* output buffer full */\
  216.     PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )    /* input buffer full */\
  217.     PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )    /* self test */
  218.  
  219.